/*******************************************************************************
 * ShowItemAction.java
 *
 * Created by jigar
 * Last modified Date: Oct 15, 2008 10:39:18 AM by nishan
  * Version : 0.1
 * Copyright (c) 2008 - 2009 cyberThink Infotech Pvt. Ltd., All rights reserved.
 ******************************************************************************/
package com.printeverywhere.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import com.printeverywhere.delegator.ItemsServiceDelegator;
import com.printeverywhere.delegator.UserServiceDelegator;
import com.printeverywhere.dto.Items;
import com.printeverywhere.dto.User;


public class ShowItemAction extends FrontBaseSupport {

	/**  */
	private static final long serialVersionUID = 1L;
	
	private static final Logger logger = Logger.getLogger(ShowItemAction.class);
	
	private List<Integer> itemId = new ArrayList<Integer>();
	
	private List<Items> compareItemList = new ArrayList<Items>();

	private final boolean showItem = true;

	public boolean isShowItem() {
		return showItem;
	}

	public ShowItemAction() {
		super(true, false);
	}
	
	public String compareItems() {
		itemId.add(1);
		itemId.add(3);
		
		for (int i=0;i<itemId.size();i++) {
			Items items = ItemsServiceDelegator.getItemsById(itemId.get(i));
			compareItemList.add(items);
		}
	
		return SUCCESS;
	}

	/**
	 * @return the itemId
	 */
	public List<Integer> getItemId() {
		return itemId;
	}

	/**
	 * @param itemId the itemId to set
	 */
	public void setItemId(List<Integer> itemId) {
		this.itemId = itemId;
	}

	/**
	 * @return the compareItemList
	 */
	public List<Items> getCompareItemList() {
		return compareItemList;
	}

	/**
	 * @param compareItemList the compareItemList to set
	 */
	public void setCompareItemList(List<Items> compareItemList) {
		this.compareItemList = compareItemList;
	}
	
}
